import Vue from "vue";//导入vue模块
// 导入vuerouter模块
import VueRouter from "vue-router";
Vue.use(VueRouter);
// 导入路由的各个模块
import login from "../pages/login/login.vue"
import my from "../pages/my/my.vue"
import orders from "../pages/orders/orders.vue";
import search from "../pages/search/search.vue"
import takeout from "../pages/takeout/takeout.vue"
// 默认导出路由的各个模块
export default new VueRouter({
    routes:[
        {
           path:"/login",
           component:login
       },
       {
        path:"/my",
        component:my,
        meta:{
            footer:true
        }
    },
    {
        path:"/orders",
        component:orders,
        meta:{
            footer:true
        }
    },
    {
        path:"/search",
        component:search,
        meta:{
            footer:true
        }
    },
    {
        path:"/takeout",
        component:takeout,
        meta:{
            footer:true
        }
    },
    {
        // 首页自动跳转到takeout中
        path:"/",
        redirect:"/takeout",
        meta:{
            footer:true
        }
    },
]
})
